home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Tools / Win95 Secrets / SETUP.Z / COMMON.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-19  |  1.5 KB  |  30 lines

  1. //==================================
  2. // PEDUMP - Matt Pietrek 1995
  3. // FILE: COMMON.H
  4. //==================================
  5.  
  6. // MakePtr is a macro that allows you to easily add to values (including
  7. // pointers) together without dealing with C's pointer arithmetic.  It
  8. // essentially treats the last two parameters as DWORDs.  The first
  9. // parameter is used to typecast the result to the appropriate pointer type.
  10. #define MakePtr( cast, ptr, addValue ) (cast)( (DWORD)(ptr) + (DWORD)(addValue))
  11.  
  12. void DumpHeader(PIMAGE_FILE_HEADER pImageFileHeader);
  13. void DumpOptionalHeader(PIMAGE_OPTIONAL_HEADER pImageOptionalHeader);
  14. void DumpSectionTable(PIMAGE_SECTION_HEADER section,
  15.                       unsigned cSections,
  16.                       BOOL IsEXE);
  17. BOOL LookupSymbolName(DWORD index, PSTR buffer, UINT length);
  18. void DumpSymbolTable(PIMAGE_SYMBOL pSymbolTable, unsigned cSymbols);
  19. LPVOID GetSectionPtr(PSTR name, PIMAGE_NT_HEADERS pNTHeader, DWORD imageBase);
  20. PIMAGE_SECTION_HEADER GetSectionHeader(PSTR name, PIMAGE_NT_HEADERS pNTHeader);
  21. PIMAGE_SECTION_HEADER GetEnclosingSectionHeader(DWORD rva,
  22.                                                 PIMAGE_NT_HEADERS pNTHeader);
  23. void DumpRawSectionData(PIMAGE_SECTION_HEADER section,
  24.                         PVOID base,
  25.                         unsigned cSections);
  26. void DumpLineNumbers(PIMAGE_LINENUMBER pln, DWORD count);
  27. void DumpDebugDirectory(PIMAGE_DEBUG_DIRECTORY debugDir, DWORD size, DWORD base);
  28. void DumpCOFFHeader(PIMAGE_COFF_SYMBOLS_HEADER pDbgInfo);
  29. void HexDump(PBYTE ptr, DWORD length);
  30.